/**
 * 
 * @authors Gary
 * @date    2016-08-31 17:36:22
 * @version $Id$
 * 
 * 以750px为基础的设计图，根据设备屏幕尺寸实时计算html元素的font-size值，达到对应的适配和效果
 * 
 * 
 */

(function(){
  var html = document.getElementsByTagName('html')[0];
  var width = window.screen.width<=window.innerWidth? window.screen.width:window.innerWidth;

  html.style.fontSize = parseFloat(width) + 'px';

  window.addEventListener('resize',function(e){
    e.preventDefault();
    width = window.screen.width<=window.innerWidth? window.screen.width:window.innerWidth;
    html.style.fontSize = parseFloat(width) + 'px';
  },false);
})();
